home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / distribs / latex / doc / bk11.doc < prev    next >
Text File  |  1992-03-18  |  17KB  |  412 lines

  1. % BOOK STANDARD DOCUMENT STYLE -- Released 14 Jan 1992
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1992 by Leslie Lamport
  4.  
  5.  
  6. %  ****************************************
  7. %  *               FONTS                  *
  8. %  ****************************************
  9. %
  10.  
  11. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  12. \normallineskip 1pt
  13. \def\baselinestretch{1}
  14.  
  15. % Each size-changing command \SIZE executes the command
  16. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  17. % where:
  18. %   BASELINESKIP = Normal value of \baselineskip for that size. (Actual
  19. %                  value will be \baselinestretch * BASELINESKIP.)
  20. %
  21. %  \FONTSIZE     = Name of font-size command.  The currently available
  22. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  23. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  24. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  25. %  \@FONTSIZE    = The same as the font-size command except with an
  26. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  27. %                  \@FONTSIZE = \@xivpt.
  28. %
  29. % For reasons of efficiency that needn't concern the designer,
  30. % the document style defines \@normalsize instead of \normalsize.
  31. % This is done only for \normalsize, not for any other size-changing
  32. % commands.
  33.  
  34. \def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
  35. \abovedisplayskip 11\p@ plus3\p@ minus6\p@
  36. \belowdisplayskip \abovedisplayskip
  37. \abovedisplayshortskip  \z@ plus3\p@   
  38. \belowdisplayshortskip  6.5\p@ plus3.5\p@ minus3\p@
  39. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  40.  
  41. \def\small{\@setsize\small{12pt}\xpt\@xpt
  42. \abovedisplayskip 10\p@ plus2\p@ minus5\p@
  43. \belowdisplayskip \abovedisplayskip
  44. \abovedisplayshortskip  \z@ plus3\p@   
  45. \belowdisplayshortskip  6\p@ plus3\p@ minus3\p@
  46. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  47. \topsep 6\p@ plus2\p@ minus2\p@\parsep 3\p@ plus2\p@ minus\p@
  48. \itemsep \parsep}}
  49.  
  50. \def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
  51. \abovedisplayskip 8\p@ plus2\p@ minus4\p@
  52. \belowdisplayskip \abovedisplayskip
  53. \abovedisplayshortskip \z@ plus\p@
  54. \belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
  55. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  56. \topsep 4\p@ plus2\p@ minus2\p@\parsep 2\p@ plus\p@ minus\p@
  57. \itemsep \parsep}}
  58.  
  59. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  60. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  61. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  62. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  63. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  64. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  65. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  66.  
  67. \normalsize  % Choose the normalsize font.
  68.  
  69.  
  70. %  ****************************************
  71. %  *            PAGE LAYOUT               *
  72. %  ****************************************
  73. %
  74. % All margin dimensions measured from a point one inch from top and side
  75. % of page.  Dimensions shrink by about 2 percent
  76.  
  77. \oddsidemargin .25in      % Left margin on odd-numbered pages.
  78. \evensidemargin 1.25in      % Left margin on even-numbered pages.
  79.  
  80. \marginparwidth 1in    %   Width of marginal notes.
  81. \marginparsep 7pt        % Horizontal space between outer margin and 
  82.                          % marginal note
  83.  
  84.  
  85. % VERTICAL SPACING:        
  86.                         % Top of page:
  87. \topmargin .73in        %    Nominal distance from top of page to top of
  88.                         %    box containing running head.
  89. \headheight 12pt        %    Height of box containing running head.
  90. \headsep .275in         %    Space between running head and text.
  91. \topskip = 11pt         %    '\baselineskip' for first line of page.
  92.                         % Bottom of page:
  93. \footskip .38in         %    Distance from baseline of box containing
  94.                         %    foot to baseline of last line of text.
  95.  
  96.  
  97. % DIMENSION OF TEXT:
  98. % 24 Jun 86: changed to explicitly compute \textheight to avoid
  99. % roundoff.  The value of the multiplier was calculated as the floor
  100. % of the old \textheight minus \topskip, divided by \baselineskip for
  101. % \normalsize.  The old value of \textheight was 530.4pt.  \textheight
  102. % is the height of text (including footnotes and figures, excluding
  103. % running head and foot).
  104.  
  105. \textheight = 38\baselineskip
  106. \advance\textheight by \topskip
  107. \textwidth 5in           % Width of text line.
  108.                          % For two-column mode: 
  109. \columnsep 10pt          %    Space between columns 
  110. \columnseprule 0pt       %    Width of rule between columns.
  111.  
  112. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  113. % natural height instead of being stretched to exactly \textheight.
  114.  
  115. % FOOTNOTES:
  116.  
  117. \footnotesep 7.7pt    % Height of strut placed at the beginning of every
  118.                       % footnote = height of normal \footnotesize strut,
  119.                       % so no extra space between footnotes.
  120.  
  121. \skip\footins 10pt plus 4pt minus 2pt  % Space between last line of text
  122.                                        % and top of first footnote.
  123.  
  124. % FLOATS: (a float is something like a figure or table)
  125. %
  126. %  FOR FLOATS ON A TEXT PAGE:
  127. %
  128. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  129. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats
  130.                                          % moved to top or bottom of
  131.                                          % text page.
  132. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and
  133.                                          % floats at top or bottom of
  134.                                          % page.
  135. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures
  136.                                          % and text.
  137. \@maxsep 20pt                            % The maximum of \floatsep, 
  138.                                          % \textfloatsep and \intextsep
  139.                                          % (minus the stretch and
  140.                                          % shrink).
  141. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  142. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for
  143.                                          % double-column figures in
  144.                                          % two-column mode.
  145. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for
  146.                                          % double-column floats.
  147. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep
  148.                                          % and \dbltexfloatsep.
  149.  
  150. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  151. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  152. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must
  153.                          % be 0pt plus ...)
  154. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.
  155. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must
  156.                          % be 0pt plus ... )
  157.  
  158. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  159. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt
  160.                          % plus ...)
  161. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  162. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  163.                          % 0pt plus ... )
  164. % MARGINAL NOTES:
  165. %
  166. \marginparpush 5pt       % Minimum vertical separation between two
  167.                          % marginal notes.
  168.  
  169.  
  170. %  ****************************************
  171. %  *           PARAGRAPHING               *
  172. %  ****************************************
  173. %
  174. \parskip 0pt plus 1pt              % Extra vertical space between
  175.                                    % paragraphs.
  176. \parindent 17pt                    % Width of paragraph indentation.
  177. %\topsep 9pt plus 3pt minus 5pt    % Extra vertical space, in addition
  178.                                    % to \parskip, added above and below
  179.                                    % list and paragraphing environments.
  180. \partopsep 3pt plus 1pt minus 2pt  % Extra vertical space, in addition
  181.                                    % to \parskip and \topsep, added when
  182.                                    % user leaves blank line before
  183.                                    % environment.
  184. %\itemsep 4.5pt plus 2pt minus 1pt % Extra vertical space, in addition
  185.                                    % to \parskip, added between list
  186.                                    % items.
  187. % See \@listI for values of \topsep and \itemsep
  188. % (Change made 9 Jun 87)
  189.  
  190. % The following page-breaking penalties are defined
  191.  
  192. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  193. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  194. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  195.  
  196. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph
  197.                                    % environment.
  198. \@endparpenalty   -\@lowpenalty    % After a list or paragraph
  199.                                    % environment.
  200. \@itempenalty     -\@lowpenalty    % Between list items.
  201.  
  202. % \clubpenalty         % 'Club line'  at bottom of page.
  203. % \widowpenalty        % 'Widow line' at top of page.
  204. % \displaywidowpenalty % Math display widow line.
  205. % \predisplaypenalty   % Breaking before a math display.
  206. % \postdisplaypenalty  % Breaking after a math display.
  207. % \interlinepenalty    % Breaking at a line within a paragraph.
  208. % \brokenpenalty       % Breaking after a hyphenated line.
  209.  
  210.  
  211. %    ****************************************
  212. %    *        CHAPTERS AND SECTIONS         *
  213. %    ****************************************
  214. %
  215. % Definition of \part moved to book.doc  19 Jan 88
  216.  
  217. % \@makechapterhead {TEXT} : Makes the heading for the \chapter
  218. % command.
  219. %
  220.  
  221. \def\@makechapterhead#1{%           % Heading for \chapter command
  222.   \vspace*{50\p@}%                  % Space at top of text page.
  223.   {\parindent \z@ \raggedright 
  224.     \ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1 THEN
  225.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  226.     \par 
  227.     \vskip 20\p@ \fi                % Space between number and title.
  228.     \Huge \bf                       % Title.
  229.     #1\par 
  230.     \nobreak                        % TeX penalty to prevent page break.
  231.     \vskip 40\p@                    % Space between title and text.
  232.   }}
  233.  
  234. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter*
  235. % command.
  236. %
  237.  
  238. \def\@makeschapterhead#1{%          % Heading for \chapter* command
  239.   \vspace*{50\p@}%                  % Space at top of page.
  240.   {\parindent \z@ \raggedright 
  241.     \Huge \bf                       % Title.
  242.     #1\par 
  243.     \nobreak                        % TeX penalty to prevent page break.
  244.     \vskip 40\p@                    % Space between title and text.
  245.   }}
  246.  
  247. % \secdef{UNSTARCMDS}{STARCMDS} :
  248. %    When defining a \chapter or \section command without using
  249. %    \@startsection, you can use \secdef as follows:
  250. %       \def\chapter { ... \secdef \CMDA \CMDB }
  251. %       \def\CMDA    [#1]#2{ ...   % Command to define
  252. %                                  % \chapter[...]{...}
  253. %       \def\CMDB    #1{ ...       % Command to define
  254. %                                  % \chapter*{...}
  255.  
  256. \def\chapter{\cleardoublepage  % Starts new right-hand page.
  257.    \thispagestyle{plain}%     % Page style of chapter page is 'plain'
  258.    \global\@topnum\z@        % Prevents figures from going
  259.                              % at top of page.
  260.    \@afterindentfalse        % Suppresses indent in first paragraph.
  261.    \secdef\@chapter\@schapter}   % Change to \@afterindenttrue to
  262.                                  % have indent.
  263.  
  264. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  265.         \refstepcounter{chapter}%
  266.         \typeout{\@chapapp\space\thechapter.}%
  267.         \addcontentsline{toc}{chapter}{\protect
  268.         \numberline{\thechapter}#1}\else
  269.       \addcontentsline{toc}{chapter}{#1}\fi
  270.    \chaptermark{#1}%
  271.    \addtocontents{lof}%
  272.        {\protect\addvspace{10\p@}} % Adds between-chapter space
  273.    \addtocontents{lot}%
  274.        {\protect\addvspace{10\p@}} % to lists of figs & tables.
  275.    \if@twocolumn                   % Tests for two-column mode.  
  276.            \@topnewpage[\@makechapterhead{#2}]%
  277.      \else \@makechapterhead{#2}%
  278.            \@afterheading          % Routine called after chapter and
  279.      \fi}                          % section heading.
  280.  
  281. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]%
  282.         \else \@makeschapterhead{#1}%
  283.               \@afterheading\fi}
  284.  
  285. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  286. %            optional * [ALTHEADING]{HEADING}
  287. %    Generic command to start a section.  
  288. %    NAME       : e.g., 'subsection'
  289. %    LEVEL      : a number, denoting depth of section -- e.g.,
  290. %                 chapter=1, section = 2, etc.  A section number will be
  291. %                 printed if and only if LEVEL < or = the value of the
  292. %                 secnumdepth counter.
  293. %    INDENT     : Indentation of heading from left margin
  294. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  295. %                 If negative, then paragraph indent of text following 
  296. %                 heading is suppressed.
  297. %    AFTERSKIP  : if positive, then skip to leave below heading,
  298. %                       else - skip to leave to right of run-in heading.
  299. %    STYLE      : commands to set style
  300. %  If '*' missing, then increments the counter.  If it is present, then
  301. %  there should be no [ALTHEADING] argument.  A sectioning command
  302. %  is normally defined to \@startsection + its first six arguments.
  303.  
  304. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus
  305.     -.2ex}{2.3ex plus.2ex}{\reset@font\Large\bf}}
  306. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus-1ex
  307.     minus-.2ex}{1.5ex plus.2ex}{\reset@font\large\bf}}
  308. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  309.     -1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize\bf}}
  310. \def\paragraph{\@startsection
  311.     {paragraph}{4}{\z@}{3.25ex plus1ex minus.2ex}{-1em}{\reset@font
  312.     \normalsize\bf}}
  313. \def\subparagraph{\@startsection
  314.      {subparagraph}{4}{\parindent}{3.25ex plus1ex minus
  315.      .2ex}{-1em}{\normalsize\bf}}
  316.  
  317. % Default initializations of \...mark commands.  (See below for their
  318. % us in defining page styles.
  319. %
  320.  
  321. \def\chaptermark#1{}
  322. % \def\sectionmark#1{}           % Preloaded definitions
  323. % \def\subsectionmark#1{}
  324. % \def\subsubsectionmark#1{}
  325. % \def\paragraphmark#1{}
  326. % \def\subparagraphmark#1{}
  327.  
  328. % The value of the counter secnumdepth gives the depth of the
  329. % highest-level sectioning command that is to produce section numbers.
  330. %
  331.  
  332. \setcounter{secnumdepth}{2}
  333.  
  334. % APPENDIX
  335. %
  336. % The \appendix command must do the following:
  337. %    -- reset the chapter counter to zero
  338. %    -- set \@chapapp to Appendix (for messages)
  339. %    -- redefine the chapter counter to produce appendix numbers
  340. %    -- reset the section counter to zero
  341. %    -- redefine the \chapter command if appendix titles and headings
  342. %       are to look different from chapter titles and headings.
  343.  
  344. \def\appendix{\par
  345.   \setcounter{chapter}{0}%
  346.   \setcounter{section}{0}%
  347.   \def\@chapapp{\appendixname}%
  348.   \def\thechapter{\Alph{chapter}}}
  349.  
  350.  
  351. %    ****************************************
  352. %    *                LISTS                 *
  353. %    ****************************************
  354. %
  355.  
  356. % The following commands are used to set the default values for the list
  357. % environment's parameters. See the LaTeX manual for an explanation of
  358. % the meanings of the parameters.  Defaults for the list environment are
  359. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  360. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  361. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  362. % called for a third-level list.)  By convention, \@listK should set
  363. % \leftmargin to \leftmarginK.
  364. %
  365. % For efficiency, level-one list's values are defined at top level, and
  366. % \@listi is defined to set only \leftmargin.
  367.  
  368. \leftmargini 2.5em
  369. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  370. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  371. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  372. \leftmarginv 1em
  373. \leftmarginvi 1em
  374.  
  375. \leftmargin\leftmargini
  376. \labelsep .5em
  377. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  378. %\parsep 4.5pt plus 2pt minus 1pt  %(Removed 9 Jun 87)
  379.  
  380. % \@listI defines top level and \@listi values of
  381. % \leftmargin, \topsep, \parsep, and \itemsep
  382. % (Added 9 Jun 87)
  383. \def\@listI{\leftmargin\leftmargini \parsep 4.5\p@ plus2\p@ minus\p@
  384. \topsep 9\p@ plus3\p@ minus5\p@
  385. \itemsep 4.5\p@ plus2\p@ minus\p@}
  386.  
  387. \let\@listi\@listI
  388. \@listi 
  389.  
  390. \def\@listii{\leftmargin\leftmarginii
  391.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  392.    \topsep 4.5\p@ plus2\p@ minus\p@
  393.    \parsep 2\p@ plus\p@ minus\p@
  394.    \itemsep \parsep}
  395.  
  396. \def\@listiii{\leftmargin\leftmarginiii
  397.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  398.     \topsep 2\p@ plus\p@ minus\p@ 
  399.     \parsep \z@ \partopsep \p@ plus\z@ minus\p@
  400.     \itemsep \topsep}
  401.  
  402. \def\@listiv{\leftmargin\leftmarginiv
  403.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  404.  
  405. \def\@listv{\leftmargin\leftmarginv
  406.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  407.  
  408. \def\@listvi{\leftmargin\leftmarginvi
  409.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  410.  
  411. \endinput
  412.